﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using FluentNHibernate.Mapping;

namespace CommonShop.Service.MapClasses {
    public class UserMap :ClassMap<User> {
        public UserMap() {
            Id(x => x.UserID);
            Map(x => x.UserName).Length(50).Not.Nullable();
            Map(x => x.UserPassword).Length(50).Not.Nullable();
            Map(x => x.Email).Length(50).Not.Nullable();
            //Map(x => x.UserRoleID).Length(50).Not.Nullable();
            References(x => x.Role);
            Map(x => x.UserState).Length(50).Not.Nullable();
        }
    }
}
